<template>
  <div className="common-card">
    <div className="common-card__header">
      <span className="common-card__header-title">{{ title }}</span>
      <div className="common-card__header-action">
        <slot name="action"></slot>
      </div>
    </div>

    <div className="common-card__content">
      <slot></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: "common-card",
});

withDefaults(
  defineProps<{
    title: string;
  }>(),
  {
    title: "提示",
  }
);
</script>

<style lang="less">
.common-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  &__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    &-title {
      font-weight: bold;
      font-size: 36px;
      color: #000000;
      line-height: 50px;
    }
  }
  &__content {
  }
}
</style>
